package com.ruoyi.auto.api;


//import com.ruoyi.auto.api.factory.RemoteAutoPublishProductFallbackFactory;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.gather.api.domain.dto.AeAutoProductDto;
import com.ruoyi.gather.api.domain.dto.TaskStatusDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.concurrent.Future;

/**
 * 自动上架服务
 *
 * @Author: j.zh
 * @Date: 2024/3/18
 * @Version: 1.0
 */
@FeignClient(contextId = "remoteAutoPublishProductService", value = ServiceNameConstants.AUTO_SERVICE)
public interface RemoteAutoPublishProductService {
    /**
     * 通过用户名查询用户信息
     *
     * @param id 上架任务ID
     * @return 结果
     */
    @GetMapping("/auto/publish/task/updatePublishTaskStatusByCurrentTime")
    public R<Object> updatePublishTaskStatusByCurrentTime(@PathVariable("id") String id);

    @GetMapping("/auto/publish/task/runPublishProductTask/{id}")
    public R<String> runPublishProductTask(@PathVariable("id") String id);

    @PostMapping("/auto/publish/task/updateTaskStatus")
    public R<Object> updateTaskStatus(@RequestBody TaskStatusDto taskStatusDto);

    @GetMapping("/pulishProduct/autoPulishProductProject/runPulishProductProjectJob")
    R<Object> runAutoPublishProject();

    @GetMapping("/auto/publish/task/deleteTortListByCollectProductId/{collectProductId}")
    R<Object> deleteTortListByCollectProductId(@PathVariable("collectProductId") Long collectProductId);

    @GetMapping("/pulishProduct/autoPulishProductProject/restartPublishProductProjectJob")
    R<Object> restartPublishProductProjectJob();

    @GetMapping("/auto/publish/task/runPublishProductTask/setCommissionAgainOne")
    R<Object> setCommissionAgainOne();

    @GetMapping("/auto/publish/task/runPublishProductTask/setCommissionAgainTwo")
    R<Object> setCommissionAgainTwo();

    @GetMapping("/pulishProduct/autoPulishProductProject/runNotCreatePulishProductProjectJob")
    R<Object>  runNotCreatePulishProductProjectJob();

    @GetMapping("/pulishProduct/autoPulishProductProject/processingProjectGroupAndDiscount")
    R<Object>  processingProjectGroupAndDiscount();
}
